package com.kuang.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kuang.common.to.mq.SeckillOrderTo;
import com.kuang.common.utils.PageUtils;
import com.kuang.gulimall.order.entity.OrderEntity;
import com.kuang.gulimall.order.vo.*;

import java.util.Map;

/**
 * 订单
 *
 * @author xiangmou
 * @email 1140968804@qq.com
 * @date 2021-05-05 20:25:08
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**订单确认页返回需要的数据
     *
     * @return
     */
    OrderConfirmVo confirmOrder();

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity entity);

    /**
     * 获取当前订单的支付信息
     * @param orderSn
     * @return
     */
    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    /**处理支付宝的返回数据
     *
     * @param vo
     * @return
     */
    String hanlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTo seckillOrderTo);
}

